{% extends "datasources_base.html" %}

{% block content %}

<div class="row">
	<div class="small-12 columns">

<a class="button small" href="{% url 'csv_manager:index' %}">Home (back to list of all tables)</a>


	</div>
</div>

<div class="row">
	<div class="small-12 columns">

Title or ID:
<h1>{{ csv_manager.title|default:csv_manager.id }}</h1>

	{% if csv_manager.description %}

	{{ csv_manager.description }}

	{% endif %}

	</div>
</div>


<div class="row">
	<div class="small-12 columns">

<p>
URI or filename:
<h2>{{ csv_manager.uri|default:csv_manager.file.name }}</h2>
</p>

	</div>
</div>

<div class="row">
	<div class="small-12 columns">

<h3>Format</h3>

	</div>
</div>

<div class="row">
	<div class="small-12 medium-6 columns">


<h4>Charset</h4>

<p>Encoding autodetection:

{% if csv_manager.sniff_encoding %}
on
</p>

{% else %}
off
</p>

<p>Setting: {{ csv_manager.codec|default:"Default (UTF-8)" }}</p>

{% endif %}




	</div>

	<div class="small-12 medium-6 columns">


<h4>CSV dialect</h4>



<p>Automatic CSV dialect detection:

{% if csv_manager.sniff_dialect %}
on
{% else %}
off
{% endif %}
</p>



{% if csv_manager.delimiter_is_tab %}

<p>Delimiter: Tabulator (TSV)</p>

{% elif csv_manager.delimiter %}

<p>Delimiter: {{ csv_manager.delimiter|default:"," }}</p>

{% endif %}


{% if csv_manager.quotechar %}

<p>Quote char: {{ csv_manager.quotechar|default:"\"" }}</p>

{% endif %}

{% if csv_manager.escapechar %}

<p>Escape char: {{ csv_manager.escapechar }}</p>

{% endif %}


<p>Double quote:

{% if csv_manager.doublequote %}
on
{% else %}
off
{% endif %}
</p>


	</div>
</div>

<div class="row">
	<div class="small-12 columns">

<h3>Actions</h3>

<a class="button" href="{% url 'csv_manager:update' csv_manager.id %}">Edit settings</a>

<a class="button" href="{% url 'csv_manager:preview_csv' csv_manager.id %}">Preview table with this settings</a></li>

<a class="button" href="{% url 'csv_manager:index_csv' csv_manager.id %}">Import table with this settings to search engine</a></li>



	</div>
</div>

{% endblock content %}